package p270jp.pxv.android.comment.domain.worker;

import android.content.Context;
import androidx.work.CoroutineWorker;
import androidx.work.WorkerParameters;
import p054bn.AbstractC1131c;
import p054bn.DebugMetadata;
import p208hf.C3605i;
import p325m0.MutabilityOwnership;
import p681zm.Continuation;

/* compiled from: EmojiDownloadWorker.kt */
/* renamed from: jp.pxv.android.comment.domain.worker.EmojiDownloadWorker */
/* loaded from: classes2.dex */
public final class EmojiDownloadWorker extends CoroutineWorker {

    /* renamed from: d */
    public final C3605i f18908d;

    /* compiled from: EmojiDownloadWorker.kt */
    @DebugMetadata(m10153c = "jp.pxv.android.comment.domain.worker.EmojiDownloadWorker", m10152f = "EmojiDownloadWorker.kt", m10151l = {27}, m10150m = "doWork")
    /* renamed from: jp.pxv.android.comment.domain.worker.EmojiDownloadWorker$a */
    /* loaded from: classes2.dex */
    public static final class C4200a extends AbstractC1131c {

        /* renamed from: a */
        public Object f18909a;

        /* renamed from: b */
        public /* synthetic */ Object f18910b;

        /* renamed from: d */
        public int f18912d;

        public C4200a(Continuation<? super C4200a> dVar) {
            super(dVar);
        }

        @Override // p054bn.ContinuationImpl
        public final Object invokeSuspend(Object obj) {
            this.f18910b = obj;
            this.f18912d |= Integer.MIN_VALUE;
            return EmojiDownloadWorker.this.mo4635a(this);
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public EmojiDownloadWorker(Context context, WorkerParameters workerParameters, C3605i iVar) {
        super(context, workerParameters);
        MutabilityOwnership.m3745m(context, "context");
        MutabilityOwnership.m3745m(workerParameters, "params");
        MutabilityOwnership.m3745m(iVar, "emojiSetupService");
        this.f18908d = iVar;
    }

    /* JADX WARN: Removed duplicated region for block: B:10:0x0021  */
    /* JADX WARN: Removed duplicated region for block: B:15:0x0033  */
    /* JADX WARN: Removed duplicated region for block: B:27:0x0068  */
    /* JADX WARN: Removed duplicated region for block: B:28:0x006e  */
    @Override // androidx.work.CoroutineWorker
    /* renamed from: a */
    /* Code decompiled incorrectly, please refer to instructions dump */
    public java.lang.Object mo4635a(p681zm.Continuation<? super androidx.work.ListenableWorker.AbstractC0904a> r7) {
        /*
            r6 = this;
            boolean r0 = r7 instanceof p270jp.pxv.android.comment.domain.worker.EmojiDownloadWorker.C4200a
            if (r0 == 0) goto L_0x0013
            r0 = r7
            jp.pxv.android.comment.domain.worker.EmojiDownloadWorker$a r0 = (p270jp.pxv.android.comment.domain.worker.EmojiDownloadWorker.C4200a) r0
            int r1 = r0.f18912d
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r3 = r1 & r2
            if (r3 == 0) goto L_0x0013
            int r1 = r1 - r2
            r0.f18912d = r1
            goto L_0x0018
        L_0x0013:
            jp.pxv.android.comment.domain.worker.EmojiDownloadWorker$a r0 = new jp.pxv.android.comment.domain.worker.EmojiDownloadWorker$a
            r0.<init>(r7)
        L_0x0018:
            java.lang.Object r7 = r0.f18910b
            an.a r1 = p023an.Intrinsics.COROUTINE_SUSPENDED
            int r2 = r0.f18912d
            r3 = 1
            if (r2 == 0) goto L_0x0033
            if (r2 != r3) goto L_0x002b
            java.lang.Object r0 = r0.f18909a
            jp.pxv.android.comment.domain.worker.EmojiDownloadWorker r0 = (p270jp.pxv.android.comment.domain.worker.EmojiDownloadWorker) r0
            p060c2.Chain.m9951I(r7)     // Catch: Exception -> 0x0061
            goto L_0x005a
        L_0x002b:
            java.lang.IllegalStateException r7 = new java.lang.IllegalStateException
            java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
            r7.<init>(r0)
            throw r7
        L_0x0033:
            p060c2.Chain.m9951I(r7)
            hf.i r7 = r6.f18908d     // Catch: Exception -> 0x0060
            android.content.Context r2 = r6.getApplicationContext()     // Catch: Exception -> 0x0060
            java.lang.String r4 = "applicationContext"
            p325m0.MutabilityOwnership.m3746l(r2, r4)     // Catch: Exception -> 0x0060
            r0.f18909a = r6     // Catch: Exception -> 0x0060
            r0.f18912d = r3     // Catch: Exception -> 0x0060
            sn.b0 r3 = r7.f16487e     // Catch: Exception -> 0x0060
            hf.h r4 = new hf.h     // Catch: Exception -> 0x0060
            r5 = 0
            r4.<init>(r7, r2, r5)     // Catch: Exception -> 0x0060
            java.lang.Object r7 = p047bg.C1124a.m10192V(r3, r4, r0)     // Catch: Exception -> 0x0060
            if (r7 != r1) goto L_0x0054
            goto L_0x0056
        L_0x0054:
            wm.j r7 = p603wm.Unit.f29503a     // Catch: Exception -> 0x0060
        L_0x0056:
            if (r7 != r1) goto L_0x0059
            return r1
        L_0x0059:
            r0 = r6
        L_0x005a:
            androidx.work.ListenableWorker$a$c r7 = new androidx.work.ListenableWorker$a$c     // Catch: Exception -> 0x0061
            r7.<init>()     // Catch: Exception -> 0x0061
            goto L_0x0073
        L_0x0060:
            r0 = r6
        L_0x0061:
            int r7 = r0.getRunAttemptCount()
            r0 = 5
            if (r7 >= r0) goto L_0x006e
            androidx.work.ListenableWorker$a$b r7 = new androidx.work.ListenableWorker$a$b
            r7.<init>()
            goto L_0x0073
        L_0x006e:
            androidx.work.ListenableWorker$a$a r7 = new androidx.work.ListenableWorker$a$a
            r7.<init>()
        L_0x0073:
            return r7
        */
        throw new UnsupportedOperationException("Method not decompiled: p270jp.pxv.android.comment.domain.worker.EmojiDownloadWorker.mo4635a(zm.d):java.lang.Object");
    }
}
